<script>
export default {
    data(){
        return{
            title:'',
            subTitle:'',
            info:''
        }
    },
    methods:{
        getimg(){
            this.$http.get('/aboutus')
            .then(res=>{
                let data = res.data
                console.log(data);
                if(data.code == 1){
                    console.log(data.msg);
                    this.title = data.data.title
                    this.subTitle = data.data.subTitle
                    this.info = data.data.info                    
                }
            })
            .catch(e=>{
                console.log(e);
            })
        }
    }
}
</script>
<template>
    <div>
        <el-button type="primary" @click="getimg">获取公司信息</el-button>
        <div>title:{{ title }}</div>
        <div>
            subTitle:{{ subTitle }}
        </div>
        <div>
            info:
            <div v-html="info"></div>
        </div>
        
    </div>
</template>
<style>
</style>